<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<!--引入header中 公共导航部分 -->
<head th:replace="header::header-commo(分类页面展示)">
</head>

<body>
<!--引用公共搜索栏部分-->
<header th:replace="header::header-nav">
</header>
<!--主区域-->
<div class="container" style="margin-top:25px;">
    <div class="row">
        <div class="col-md-12">
            <ol class="breadcrumb">
                <li><a href="#">首页</a></li>
                <li th:text="${itemCat.name}" class="active">精品手办</li>
            </ol>
        </div>
        <div class="col-md-12">
            <div class="row  text-center">
                <!--pageInfo.list : 调用的是PageInfo对象中的内置方法,遍历当前页所有分页信息-->
                <div th:each="item:${pageInfo.list}" class="col-md-4">
                    <a href="#" th:href="@{/item/selectById/{id}(id=${item.id})}" class="thumbnail"> <img class="img-responsive" th:src="@{'/upload/'+${item.image}}" src="img/goods1.jpg"/></a>
                    <p th:text="${item.name}">提莫 手办</p>
                    <p style="font-size: 18px;"><strong th:text="${item.shopPrice}">¥150.00</strong></p>
                </div>
            </div>
            <div class="row">
                <div class="col-md-4 col-md-offset-8">

                    <nav aria-label="Page navigation">
                        <ul class="pagination">
                            <li>
                                <a th:href="@{/item/selectByCid/{cid}/{prePage}(cid=${itemCat.cid},prePage=${pageInfo.prePage==0 ? 1 :pageInfo.prePage})}" href="#" aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                            <li th:class="${i==pageInfo.pageNum ? 'active':''}"  th:each=" i: ${pageInfo.navigatepageNums}"><a th:href="@{/item/selectByCid/1/{i}(i=${i})}" href="#"th:text="${i}">1</a></li>

                            <li>
                                <a th:href="@{/item/selectByCid/{cid}/{nextPage}(cid=${itemCat.cid},nextPage=${pageInfo.nextPage==0 ? pageInfo.pages:pageInfo.nextPage})}" href="#" aria-label="Next">
                                    <span  aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        </ul>
                    </nav>
                </div>
            </div>

        </div>

    </div>

</div>
<!--底部-->
<footer th:replace="footer::footer-comm">
</footer>
</body>

</html>